Decoding method and decoding apparatus

ABSTRACT

An image decoding method is provided for decoding each block of a digital image divided into a plurality of blocks, from a coded image signal including codewords of the block and codewords of coding mode information of the block. The method comprises separating the codewords of a target block and the codeword of coding mode information of the target block from the coded image signal, and decoding the coding mode information of the target block from the separated codeword of the coding mode information using a codeword table. The codeword table is selected from a plurality of codeword tables by referring to a combination of coding mode information of previously decoded blocks at the periphery of the target block, the codeword tables each having codewords, each codeword being determined based on a combination of coding mode information of previously decoded blocks at the periphery of the target block. The method further comprises decoding pixel data of the target block from the separated codewords of the target block, based on the decoded coding mode information of the target block.

CROSS REFERENCE TO RELATED APPLICATION

This is a continuation of U.S. Application No. 09/091,922, filed Jun.25, 1998, U.S. Pat. 6,345,121, which is the National Stage ofInternational Application No. PCT/JP97/04034, filed Nov. 6, 1997, thecontents of which are expressly incorporated by reference herein intheir entireties. The International Application was published under PCT21 (2) in Japanese.

The present invention relates to an image coding apparatus and an imagedecoding apparatus for coding and decoding digital images, and alsorelates to recording media in which image coding/decoding programs arestored.

BACKGROUND ART

One of known conventional image coding systems requiring reversibilityis the MMR (Modified Modified Read) system which is used in facsimileapplications. However, since the MMR system is a system in whichprocessing is performed for the entire one frame input, it is difficultto maintain consistency with another coding system adopted in ITU-TH.261 and ISO/IEC MPEG, etc. in which one frame is divided into aplurality of blocks and processing is performed in block units. Thus,the MMMR (Modified MMR) that is an improved version of the MMR system isadopted as an verification model of MPEG4 (ISO/IECJTC/SC29/WG11 N1277,July 1996).

An image coding system which divides a one-frame image intotwo-dimensional blocks consisting of a plurality of pixels and codes theimage for each block, performs coding by dividing data into two parts:one is coding mode data which indicates whether or not block movement iscorrected for each block, presence or absence of a quadrature conversioncoefficient and whether or not a block has significance in the case thatthe input image is a form image which indicates the form and synthesisratio of the object, etc., and the method for coding pixel values withinthe block, and the other is coding data of the pixel values within theblock.

However, the coding method that performs coding by dividing the aboveimage block into the coding mode data that indicates the coding mode ofsaid block and the data concerning the pixel values within said blockhas the problem that the percentage of the block mode data in thecreated coded signal relatively increases, deteriorating its codingefficiency in the case that blocks without movement information,quadrature conversion coefficient or significant form, etc. increaseswithin one frame.

DISCLOSURE OF INVENTION

The objective of the present invention is to provide an image codingapparatus and image decoding apparatus that will prevent the codingefficiency from drastically deteriorating even for those images thatcontain numerous blocks without movement information, quadratureconversion coefficient or significant form, etc. within one frame.

The image coding apparatus of the first invention is an image codingapparatus that, when coding the mode data, predicts the coding mode of ablock to be coded from the mode data of already coded peripheral blocksand switches a code word table that specifies code words according tothe hitting ratio of prediction.

The image decoding apparatus of the second invention is an imagedecoding apparatus that, when decoding the mode data, predicts thecoding mode of a block to be decoded from the mode data of alreadydecoded peripheral blocks and switches a code word table that specifiescode words according to the hitting ratio of prediction.

The first and second inventions can improve the coding efficiency byshortening the code word length of a coding mode with high hittingratio.

The image coding apparatus of a third invention is an image codingapparatus that collectively codes the coding mode data corresponding toa plurality of blocks for a digital image which has been divided intothose blocks.

The image decoding apparatus of the fourth invention is an imagedecoding apparatus that collectively decodes code words regarding themode data corresponding to a plurality of blocks.

The third and fourth inventions can easily perform coding/decoding usinga correlation between blocks of the mode data, thus improving codingefficiency.

The image coding apparatus of the fifth invention is an image codingapparatus that, when coding the mode data, predicts the coding mode of ablock to be coded from the mode data of already coded peripheral blocksand switches a probability model that specifies appearance probabilityaccording to the hitting ratio of prediction.

The image decoding apparatus of the sixth invention is an image decodingapparatus that, when performing arithmetic decoding of mode data,predicts the coding mode of a block to be decoded from the mode data ofalready decoded peripheral blocks and switches a probability model thatspecifies appearance probability according to the hitting ratio ofprediction.

The fifth and sixth inventions can perform arithmetic coding/decoding bypredicting a coding mode and adaptively switching to a probability modelfor which a coding mode with high appearance probability is set, thusimproving coding efficiency.

The recording medium of the seventh invention is a computer recordingmedium that stores the program data that implements at least one of theimage coding apparatus/image decoding systems that relate to the firstto sixth inventions.

BRIEF DESCRIPTION OF DRAWINGS

FIG. 1 is a block diagram of the image coding system that relates to thefirst embodiment of the present invention;

FIG. 2 is a functional block diagram of the mode data coding sectionprovided in the image coding system in the first embodiment;

FIG. 3 is a configuration diagram of the code word table predictiontable contained in the mode data coding section;

FIG. 4 is a diagram showing how a frame image is divided into sections;

FIG. 5 is a diagram showing the coding modes of a block to be coded andperipheral blocks;

FIG. 6 is a diagram showing the pixel value status of each block in oneframe;

FIG. 7A is a diagram showing code words when the blocks shown in FIG. 6are image-coded according to the present invention;

FIG. 7B is a diagram showing code words when the blocks shown in FIG. 6are image-coded according to a general coding system;

FIG. 8 is a block diagram of the image decoding system of the secondembodiment of the present invention;

FIG. 9 is a functional block diagram of the mode data decoding sectionprovided in the image decoding system in the second embodiment;

FIG. 10 is a block diagram of the image coding system of the thirdembodiment of the present invention;

FIG. 11 is a configuration diagram of the code word table provided forthe image coding system in the third embodiment;

FIG. 12 is a diagram showing an example of the pixel value status ofeach block with respect to an image to be coded;

FIG. 13A is a diagram showing code words when the block in FIG. 12 isimage-coded according to the present invention;

FIG. 13B is a diagram showing code words when the block in FIG. 12 isimage-coded according to a general coding system;

FIG. 14 is block diagram of the image decoding system that relates tothe fourth embodiment of the present invention;

FIG. 15 is a conceptual diagram of the arithmetic coding method;

FIG. 16 is a configuration diagram of the appearance probability tableused in the fifth embodiment of the present invention;

FIG. 17 is a schematic view of the recording medium that stores theimage coding/decoding program that relates to the sixth embodiment ofthe present invention, and

FIG. 18 is a schematic diagram of the network that distributes the imagecoding/decoding program of the present invention.

BEST MODE FOR CARRYING OUT THE INVENTION

With reference now to the attached drawings, the embodiments of thepresent invention are explained in detail below:

First Embodiment

FIG. 1 shows a block diagram of the image coding system that constitutesthe first embodiment of the present invention. The image coding systemshown in said figure comprises coding mode judgment section 1 thatoutputs the coding mode data which indicates the coding mode of a pixelblock to be coded, mode data coding section 2 that generates mode datacode words using a code word table which will be described later, blockdata coding section 3 that generates a code word for the pixel valuewithin the pixel block, and multiplexing section 4 that generates acoded image signal by multiplexing the code word regarding the mode dataand the code word regarding the pixel value data. Here, code 11indicates a pixel value signal of a block of a digital input imagedivided by the block division block which is not shown in the figure;code 12 indicates the coding mode data of the pixel block; code 13indicates the code word regarding the mode data; code 14 indicates thecode word regarding the block data; code 15 indicates a coded imagesignal of the digital input image divided into blocks.

FIG. 2 shows the functional block configuration of mode data codingsection 2. As shown in FIG. 2, mode data coding section 2 comprises modedata storage section 21 that stores coding mode data, mode data readsection 22 that reads coding mode data of blocks peripheral to the blockto be coded, code word table prediction table 23 consisting of aplurality of code word tables, code word table selection section 24 thatselects the optimal code word table, and coding section 25 that codesmode data based on the code word table.

FIG. 3 shows an actual example of code word table prediction table 23.It is designed that the coding efficiency may be improved by adjusting acombination of the mode data of the already coded peripheral blocks anda plurality of code word tables which contain different coding patterns.

The operation of the image coding system configured above is explainedbelow:

Firstly, the digital input image, as shown in FIG. 4, constitutes forminformation that indicates the form or the ratio of synthesis of anormal color signal or object wherein one frame is configured fromhorizontal M pixels and vertical N lines. The one-frame digital inputimage is divided into a plurality of pixel blocks made up of horizontalm pixels and vertical n lines by the block division block which is notshown in the figure. Pixel value signal 11 of the resulting pixel blocksis input to coding mode judgment section 1 and block data coding section3.

Coding mode judgment section 1 determines the coding mode of that pixelblock from the pixel value data of the pixel block at position (i,j)(hereafter described as POS (i,j)). In the case of a normal colorsignal, the presence or absence of movement correction and the presenceor absence of quadrature conversion coefficient are determined, and inthe case of a form signal, the presence or absence of a significant formis determined. In the case of a binary image signal, there can be threestatuses: (A) all pixels in the block are black pixels; (B) all pixelsare white pixels; (C) black pixels and white pixels are mixed.Therefore, there are three coding modes A, B, and C corresponding tothree statuses, respectively. The coding mode of the pixel block at POS(i,j) is described hereafter as MODE (i,j). Coding mode judgment section1 outputs determined MODE (i,j) to mode data coding section 2 and blockdata coding section 3.

Mode data coding section 2 selects the code word table corresponding toMODE (i,j) from the code word table prediction table shown in FIG. 3 togenerate a code word regarding the mode data.

The method of coding the mode data is explained in detail below:

In mode data coding section 2, supposing that the coding mode of thepixel block now to be coded is MODE (i,j) it is possible to predict MODE(i,j) from coding modes MODE (i−1,j), MODE (i−1,j−1) and MODE (i,j−1) ofthe already coded pixel blocks (POS (i−1,j−1), POS (i,j−1), POS (i−1,j))peripheral to the pixel block at POS (i,j) as shown in FIG. 5.

That is, when there are three coding modes A, B, and C, in the case thatMODE (i−1,j), MODE (i−1,j−1), and MODE (i,j−1) are all A, there is ahigh probability that MODE (i,j) will also be A.

In typical conventional mode data coding, a specific code word isprovided for each of coding modes A, B and C and a code word is assignedaccording to the coding mode determined. That is, only one set of thecode word of coding mode A, code word of coding mode B and code word ofcoding mode C is prepared beforehand (code word table) and the code wordfor the corresponding coding mode is extracted and output. In additionto that, the length of each code word is fixed at the same length(number of bits).

As shown in FIG. 3, in the present invention, a plurality of code wordtables are provided in the code word table prediction table and somespecific code word tables include code words of a short code wordlength. In the case that the coding mode of blocks peripheral to theblock to be coded is inclined toward a specific mode, there is a highprobability of the block to be coded being the same as the specificmode, and thus the code word of the specific mode is set shorter thanthe code word of other coding modes.

To be concrete, in the case that the coding mode of the peripheralblocks is inclined toward A, the code word of coding mode A is set to“0” (code word length=1 bit); the code word of coding mode B is set to“10” (code word length=2 bits); and the code word of coding mode C isset to “11” (code word length=2 bits). In the case that numerous B's areincluded in the coding mode of the peripheral blocks or in the case thatnumerous C's are included in the coding mode of the peripheral blocks,the code word length of the respective dominant coding modes is setshorter.

Mode data coding section 2 stores the mode data sent from coding modejudgment section 1 in mode data storage section 21 to make it easy toacquire the coding mode information of the blocks peripheral to theblock to be coded. The mode data of the pixel block is stored in theposition corresponding to said block within one frame.

When block position POS (i,j) of the block to be coded is input, modedata read section 22 reads coding modes MODE (i−1,j), MODE (i−1,j−1),and MODE (i,j−1) at block positions POS (i−1,j−1), POS (i,j−1), POS(i−1,j) from mode data storage section 21 and gives them to code wordtable selection section 24.

Code word table selection section 24 selects the code word table set inassociation with a combination that matches the combination of codingmodes MODE(i−1,j), MODE(i−1,j−1), and MODE (i,j−1) of the peripheralblocks from code word table prediction table 23. For example, in thecase that the coding modes of the peripheral blocks are (A,A,A),(A,A,B), (A,A,C), (B,A,A), (C,A,A), (A,B,A) or (A,C,A), the code wordtable of (A=0, B=10, C=11) is selected. The example above is the casewhere coding mode A of the peripheral blocks is dominant. In the casethat coding mode B of the peripheral blocks is dominant, the code wordtable of (A=10, B=0, C=11) is selected, and in the case that coding modeC of the peripheral blocks is dominant, the code word table of (A=10,B=11, C=0) is selected. The code word table selected according to themode statuses of peripheral blocks is given to coding section 25.

Thus, the present invention allows the code word table used for codingof mode data to be switched adaptively according to the coding modestatuses of peripheral blocks.

Coding section 25 codes the mode data of the block to be coded based onthe selected code word table. Now, in the case that the coding modeinput from coding mode judgment section 1 is A and the code word tableinput from code word table selection section 24 is (A=0, B=10, C=11),code word=0 is output.

Therefore, in the case that blocks peripheral to the block to be codedincludes a dominant mode and the mode of the block to be coded matchesthe dominant mode, a short code word is generated.

Suppose that the coding mode status of each pixel block of a frame imageis as shown in FIG. 6. If the code word table can be changed adaptivelyaccording to the coding mode statuses of peripheral blocks as in thecase of the present invention, the code word length of the hatched blockin FIG. 7A becomes shorter, and thus the coding efficiency can beimproved. On the other hand, in the case that a frame image as shown inFIG. 6 is coded using the code word table with only one set of (A=0,B=10, C=11) fixed, the coding result will be as shown in FIG. 7B. It isobservable that the coding efficiency is reduced compared to the codeword shown in FIG. 7A.

If A or B is input as the coding mode regarding the pixel block at POS(i,j) from coding mode judgment section 1, block data coding section 3stops coding of the pixel value of the block to be coded. This isbecause in the case of coding modes A and B, all pixels in the block areblack or white and therefore decoding of the pixel block is possiblewith only the mode data. In the case of coding mode C, the pixel valueof the block to be coded is coded and the code word regarding the blockdata is output.

Multiplexing section 4 multiplexes the code word regarding the mode datawith the code word regarding the block data to output a coded imagesignal.

As seen above, the present embodiment provides a plurality of code wordtables to convert individual mode data to a code word in associationwith the coding mode statuses of peripheral blocks and assigns shortcode words to a dominant mode prevailing in the peripheral blocks, thusallowing the code word tables to be switched adaptively according to thecoding mode statuses of peripheral blocks.

On the other hand, instead of handing over the content of the code wordtable selected by code word table selection section 24 to coding section25, it is also possible to notify only the number of the selected codeword table to coding section 25 so that coding section 25 mayincorporate the content of the code word table specified with a numberfrom code word table prediction table 23.

Embodiment 2

FIG. 8 is a block diagram of the image decoding system that relates tothe second embodiment of the present invention. In said figure, the samesignals as those in the first embodiment shown in FIG. 1 are assignedthe same numbers and their explanations are omitted here.

This image decoding system comprises de-multiplexing section 81 thatseparates the code word regarding the mode data and the code wordregarding the block data from the coded image signal, mode data decodingsection 82 that reproduces the coding mode data of the pixel block fromthe code word regarding the mode data, and block data decoding section83 that reproduces the pixel value within the pixel block in the modeindicated by the reproduced mode data.

FIG. 9 is a functional block diagram of mode data decoding section 82.Mode data decoding section 82 comprises decoding section 91 that decodesthe code word of the mode data, mode data storage section 92 that storesthe mode data of the decoded pixel block, mode data read section 93 thatreads the stored mode data, code word table prediction table 94 thatcombines the mode statuses of peripheral blocks viewed from the block tobe decoded and code word tables, and code word table selection section95 that selects a code word table.

If the code word of the mode data coded by mode data coding section 2 inthe first embodiment is decoded by the image decoding system in thepresent embodiment, it is necessary to use code word table predictiontable 94 with the same content as that shown in FIG. 3.

The operation of the image decoding system in the second embodimentconfigured as shown above is now explained below.

Firstly, de-multiplexing section 81 separates coded image signal 15 intocode word 13 regarding the mode data and code word 14 regarding theblock data. Code word 13 regarding the mode data is input to mode datadecoding section 82, while code word 14 regarding the block data isinput to block data decoding section 83.

Upon receiving codeword 13 regarding the mode data, mode data decodingsection 82 reproduces coding mode data 12 of the corresponding blockfrom code word table prediction table 94.

With reference now to FIG. 9, the operation of mode data decodingsection 82 is explained. After decoding section 91 decodes the code wordof mode data, the decoded mode data is written to the correspondingpixel block position of mode data storage section 92.

In mode data read section 93, position information within one frame ofthe block to be decoded is input. Mode data read section 93 reads themode data of the decoded blocks peripheral to the block to be decodedfrom mode data storage section 92 based on the position information ofthe block to be decoded and inputs it to code word table selectionsection 95.

Code word table selection section 95 extracts the same code word tableas the code word table at the time of coding from code word tableprediction table 94 based on the mode data statuses of the blocksperipheral to the block to be decoded. The code word table extractedfrom code word table prediction table 94 is handed over to decodingsection 91.

Decoding section 91 decodes the code word regarding the mode data of theblock to be decoded using the code word table handed over from code wordtable selection section 95.

For example, supposing that the block to be decoded by mode datadecoding section 82 is a block at POS (i,j), MODE (i−1,j), MODE(i−1,j−1), and MODE (i,j−1) shown in FIG. 5 have already beenreproduced, and it is possible to correctly reproduce the coding mode ofthe block MODE (i,j) from the code word regarding the mode data coded inthe first embodiment by switching the code word table from the statusesof modes MODE (i−1,j) MODE (i−1,j−1) and MODE (i,j−1) according to FIG.3.

The decoded mode data is stored in mode data storage section 92 and atthe same time input to block data decoding section 83.

Block data decoding section 83 receives code word 14 regarding the blockdata and reproduces digital pixel value signal 31 within the block andoutputs it by performing decoding processing corresponding to the codingmode shown in coding mode data 12.

In the first and second embodiments above, the mode data of threeperipheral blocks was used to predict the mode data of the block to becoded, but it is also possible to increase the number of referenceblocks.

The embodiment above describes the case where there are 3 kinds (A, B,C) of mode data, but it is also possible to apply the similar processingto more statuses.

Combining the image coding system in the first embodiment and the imagedecoding system in the second embodiment will allow a coding/decodingsystem to be implemented.

Third Embodiment

FIG. 10 shows a block diagram of the image coding system that relates toa third embodiment of the present invention. In said figure, the samefunctional blocks and same signals as those of the system shown in FIG.1 are assigned the same numbers and their explanations are omitted.

The image coding system in the present embodiment comprises coding modejudgment section 1, memory 101 that stores coding mode data output fromcoding mode judgment section 1 for each block and outputs one-frame datatogether, mode data coding section 102 that codes one-frame coding modedata together to create code words, block data coding section 3, memory103 that stores the code word regarding the block data for each blockand outputs one-frame data together, and multiplexing section 104 thatmultiplexes the code word regarding one-frame mode data with the codeword regarding the block data of each pixel block within the same frameto generate a coded image signal. Code 111 indicates one-frame codingmode data; 112, the code word regarding one-frame mode data; 113, thecode word regarding one-frame block data; and 114, the coded imagesignal of a digital input image.

The operation of the image coding system in the present embodimentconfigured above is explained below:

Firstly, for digital input image signal 11, coding mode MODE (i,j) ofthe block at POS (i,j) is determined by coding mode judgment section 1as in the case of the first embodiment. The determined MODE (i,j) isstored in memory 101. When mode data MODE (1,1), MODE (1,2), . . . MODE(2,1), . . . MODE (X,Y) of all the pixel blocks corresponding to oneframe are stored, all the mode data is transferred to mode data codingsection 102 at a time.

Mode data coding section 102 codes one-frame mode data using the codeword table shown in FIG. 11. The coding operation of mode data codingsection 102 is explained in detail below.

Mode data coding section 102 has a code word table (shown in FIG. 11) toencode mode data of a plurality of blocks collectively. In this codeword table, a specific code word is assigned to each of all pairs of 3kinds of mode (A, B, C). Especially for combinations of the same modes(A,A) (B,B), and (C,C), the code word length is designed to berelatively shorter than other combinations.

Now, suppose that one-frame mode data with the content as shown in FIG.12 is transferred to mode data coding section 102.

Mode data is sequentially extracted from the start of the line 2 blocksat a time. In the case of FIG. 12, mode data will be coded twoconsecutive data items in horizontal direction at a time in order of(A,B), (B,B), and (A,A).

FIG. 13A shows the result of coding the one-frame mode data shown inFIG. 12 using the code word table shown in FIG. 11. It is observablethat the area where one combination of the same modes appears afteranother contains short code words. FIG. 13B shows the result of codingthe one-frame mode data shown in FIG. 12 using a fixed code word tablesuch as A=0, B=10, C=1 as in the case of the previous comparisonexample. As clearly seen from a comparison of FIG. 13A and FIG. 13B, thenumber of bits of the code word of one-frame mode data in the codingsystem of the present invention is less than that in conventional codingsystems.

Mode data code word 112 coded in this way is given to multiplexingsection 104.

On the other hand, the pixel data of the pixel block is coded by blockdata coding section 3 as in the case of the first embodiment, and thecode word regarding the block data is stored in memory 103 and organizedinto code word 113 regarding the block data corresponding to the entireone frame.

Then, multiplexing section 104 multiplexes code word 112 regarding themode data and code word 113 regarding the block data of the entire oneframe and outputs coded image signal 114.

Thus, the third embodiment stores the mode data of one-frame pixel blockin memory before coding a plurality of mode data items collectively. Inthe code word table to encode a plurality of mode data itemscollectively, shorter code words are set for combinations of the samemode data.

Fourth Embodiment

FIG. 14 is a block diagram of the image decoding system that relates toa fourth embodiment of the present invention. In said figure, the samesignals as those shown in FIG. 1 and FIG. 8 are assigned the samenumbers and their explanations are omitted.

The image decoding system of the present embodiment comprisesde-multiplexing section 141 that separates a code word string regardingthe mode data and a code word string regarding the block data from acoded signal, mode data decoding section 142 that obtains mode data froma code word string regarding the mode data, memory 143 that stores modedata of all blocks corresponding to one frame, and block data decodingsection 83 that reproduces pixel values from a code word stringregarding the block data.

Mode data decoding section 142 has a code word table shown in FIG. 11 todecode the code word of the mode data coded by the image coding systemin the third embodiment. Mode data decoding section 142 decodes the codeword of the mode data using the code word table in FIG. 11.

The operation of the image decoding systems in the fourth embodimentconfigured above is explained below:

Firstly, de-multiplexing section 141 receives coded signal 114,separates and outputs coded signal 114 to the code word string regardingthe mode data of all blocks corresponding to one frame and the code wordstring regarding the block data of each block.

Mode data decoding section 142 decodes the code word of the mode datainto mode data of two pixel blocks using the code word table in FIG. 11in a procedure opposite to the coding procedure in the third embodiment.Mode data 111 decoded by mode data decoding section 142 is stored inmemory 143 and its one-frame data is output together to block datadecoding section 83.

The mode data of all blocks within one frame decoded by mode datadecoding section 142 is stored in memory 143 and mode data MODE (i,j) ofthe block to be reproduced is given to block data decoding section 83 inaccordance with a request from block data decoding section 83.

Lastly, block data decoding section 83 receives code word string 14regarding the block data of the block at position POS (i,j) separatedand output by de-multiplexing section 141 and mode data MODE (i,j) ofthe block output from memory 143 and reproduces and outputs pixel valuesin the block in accordance with MODE (i,j).

Furthermore, an appropriate sorting block which is not shown in thefigure reproduces the digital image signal by sorting the pixel valuesfor each block output in the scanning order.

In the third and fourth embodiments above, mode data items of twocontinuous pixel blocks were coded together, but it is also possible toencode mode data items of numerous pixel blocks together. Further, aplurality of continuous pixel blocks in horizontal direction are coded,but it is also possible to encode a plurality of continuous pixel blocksin vertical direction or continuous pixel blocks in two-dimensionaldirections together. This requires a code word table corresponding tothe combination of blocks to be coded together.

Fifth Embodiment

The first to fourth embodiments above describe coding of mode data usingthe code word table shown in FIG. 3 or FIG. 4, but it is also possibleto use other coding techniques such as arithmetic coding technique.

In the image coding/decoding system that relates to a fifth embodiment,a mode data coding section/mode data decoding section performscoding/decoding using an arithmetic coding technique and switchesprobability models used for arithmetic coding/decoding by predictedvalues of the mode data of the block to be coded/decoded. Theconfiguration except the mode data coding section/mode data decodingsection is the same as the above-mentioned embodiments.

In arithmetic coding, the data series to be coded is mapped on aprobability number line divided according to the appearance probabilityof dominant symbols and inferior symbols and their positions areexpressed in binary point values and output as code series.

FIG. 15 shows a conceptual diagram of arithmetic coding.

This figure presents a case where data series S={010011 . . . } is codedwith “P” indicating the appearance probability of “0” and “Q” indicatingthe appearance probability of “1”. The position of “C” on theprobability number line indicates the code corresponding to data string“S”. In such coding, code “C” is determined by the following codingrules.

Coding Rules

When Data is 0 (Dominant Symbol)

C←C+A*Q

A←A*P

When Data is 1 (Inferior Symbol)

A←A * Q

“A” is an which indicates the range of the existence of codes andcorresponds to the hatching area in FIG. 15.

Appearance probabilities P and Q are the probability models andcorrespond to the code word tables. A conventional arithmetic codingtechnique often uses fixed probability models. If three kinds of dataitems A, B, and C are coded/decoded as shown in the embodiment above,three types of appearance probability are also required.

The present embodiment performs arithmetic coding/decoding using aprobability model table in which a plurality of probability models (No1to N3) are set as shown in FIG. 16. The probability model table is atable showing the correspondence between a combination of modes of aplurality of pixel blocks and probability model as in the case of thecode word table prediction table shown in FIG. 3. The combination ofmodes is the same as that shown in FIG. 3 and is not illustrated here,but the model number corresponds to the combination of modes. Appearanceprobability of each mode making up the probability model is set in sucha way that if there are numerous specific modes in the peripheralblocks, the appearance probability for those modes is relatively high.

When a fixed probability model is used, the code word length of inferiorsymbols becomes longer, and therefore in the case that an image thatcontains numerous inferior symbols is coded, the coding efficiency isreduced.

The present embodiment predicts the mode of the block to be coded fromthe modes of peripheral blocks and performs coding using a probabilitymodel with the appearance probability of the predicted mode set higher,making it possible to improve the coding efficiency.

Sixth Embodiment

The present invention implements the configurations shown in the firstto fifth embodiments by software or programming and allowing anotherindependent computer system to easily implement them by transferringthem recorded in a recording medium such as a floppy disk.

If a computer system incorporates a function equivalent to coding modejudgment section 1, a function equivalent to block data coding section3, a function equivalent to multiplexing sections 4 and 104 and anexisting mode data coding function, it is also possible to replace theprogram implementing mode data coding sections 2 and 102 by anotherprogram implementing an existing mode data coding function. In thiscase, only the program implementing mode data coding sections 2 and 102or the program implementing program replacement processing is stored ina recording medium and carried.

FIG. 17 shows a floppy disk as an example of recording medium.

In this embodiment, a floppy disk is shown as a recording medium, butany IC card, CD-ROM, magnet tape and whatever capable of recording theprogram can be used likewise.

Furthermore, as a method of downloading the program above to a computersystem, it is also possible to download the program from a server deviceto a terminal device via the Internet or other communication network asshown in FIG. 18.

The present invention is not limited only to the above mentionedembodiments, but can be modified in various ways as long as they are notdeviated from the purpose of the present invention and those areincluded in the range of the present invention.

INDUSTRIAL APPLICABILITY

As described above, the present invention is useful for image codingsystems or image decoding systems which perform coding or decoding bydividing a digital image into blocks and separating block coding modeand block data for each block, and suited to improving the codingefficiency of code words regarding to the coding mode and coding theinput images with fewer bits.

What is claimed is:
 1. An image decoding method of decoding each block of a digital image divided into a plurality of blocks, from a coded image signal including codewords of the each block and codewords of coding mode information of the each block, said method comprising: separating the codewords of a target block and the codeword of coding mode information of the target block from the coded image signal; decoding the coding mode information of the target block from the separated codeword of the coding mode information using a codeword table, the codeword table being selected from a plurality of codeword tables by referring to a combination of coding mode information of previously decoded blocks at the periphery of the target block, said codeword tables each having codewords, each codeword being determined based on a combination of coding mode information of previously decoded blocks at the periphery of the each target block; and decoding pixel data of the target block from the separated codewords of the target block, based on the decoded coding mode information of the target block.
 2. An image decoding apparatus that decodes each block of a digital image divided into a plurality of blocks, from a coded image signal including codewords of the each block and codewords of coding mode information of the each block, said apparatus comprising: a de-multiplexing section that separates the codeword of a target block and the codeword of coding mode information of the target block from the coded image signal; a mode information decoding section that decodes the coding information of a target block from the separated codeword of the coding mode information using a codeword table, said codeword table being selected from a plurality of codeword tables by referring to a combination of coding modes of previously decoded blocks at the periphery of the target block, said codeword tables each having codewords, each codeword being determined based on a combination of coding modes of previously decoded blocks at the periphery of the each target block; and a block data decoding section that decodes pixel data of the target block from the separated codewords of the target block, based on the decoded coding mode information of the target block.
 3. A computer readable recording medium with an image decoding program stored therein, said program being executed by a computer to execute a procedure for decoding each block of a digital image divided into a plurality of blocks, from a coded image signal including codewords of the each block and codewords of coding mode information of the each block, said program comprising: separating the codewords of a target block and the codeword of coding mode information of the target block from the coded image signal; decoding the coding mode information of the target block from the separated codeword of the coding mode information using a codeword table, the codeword table being selected from a plurality of codeword tables by referring to a combination of coding mode information of previously decoded blocks at the periphery of the target block, said codeword tables each having codewords, each codeword being determined based on a combination of coding modes of previously decoded blocks at the periphery of the each target block; and decoding pixel data of the target block from the separated codeword of the target block, based on the decoded coding mode information of the target block. 